<%@page import="com.ffms.entity.Admin" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <base href="<%=basePath%>"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <meta http-equiv="pragma" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache"/>
    <meta http-equiv="expires" content="0"/>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
    <meta http-equiv="description" content="This is my page"/>
    <style type="text/css">


    </style>
    <link href="css/css.css" rel="stylesheet" type="text/css"/>
</head>
<SCRIPT language=JavaScript>
    function tupian(idt) {
        var nametu = "xiaotu" + idt;
        var tp = document.getElementById(nametu);
        tp.src = "images/ico04.gif"; //图片ico04为白色的正方形
        for (var i = 1; i < 30; i++) {
            var nametu2 = "xiaotu" + i;
            if (i != idt * 1) {
                var tp2 = document.getElementById('xiaotu' + i);
                if (tp2 != undefined) {
                    tp2.src = "images/ico06.gif";
                } //图片ico06为蓝色的正方形
            }
        }
    }

    function list(idstr) {
        var name1 = "subtree" + idstr;
        var name2 = "img" + idstr;
        var objectobj = document.all(name1);
        var imgobj = document.all(name2);
        //alert(imgobj);
        if (objectobj.style.display == "none") {
            for (i = 1; i < 10; i++) {
                var name3 = "img" + i;
                var name = "subtree" + i;
                var o = document.all(name);
                if (o != undefined) {
                    o.style.display = "none";
                    var image = document.all(name3);
                    //alert(image);
                    image.src = "images/ico04.gif";
                }
            }
            objectobj.style.display = "";
            imgobj.src = "images/ico03.gif";
        } else {
            objectobj.style.display = "none";
            imgobj.src = "images/ico04.gif";
        }
    }
</SCRIPT>

<body>
<!-- 个人信息 -->
<table width="198" border="0" cellpadding="0" cellspacing="0" class="left-table01">
    <tr>
        <TD>
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="207" height="55" background="images/nav01.gif">
                        <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="25%" rowspan="2"><img src="images/ico02.gif" width="35" height="35"/></td>
                                <td width="75%" height="22" class="left-font01">您好，
                                    <span class="left-font02">
<%--										<%
<%--						Admin admin = 	(Admin)session.getAttribute("admin");
<%--						if(admin != null)
<%--						System.out.println(admin.getUserName());
<%--								//输出当前用户名
<%--										--%>
								<c:if test="${sessionScope.role=='admin' }">
                                    ${sessionScope.user.userName }
                                </c:if>
	                            <c:if test="${sessionScope.role=='fm' }">
                                    ${sessionScope.user.name }
                                </c:if>
<%--											输出当前用户名--%>
										</span></td>
                            </tr>
                            <tr>
                                <td height="22" class="left-font01">
                                    [&nbsp;<a href="/ffms/LogoutServlet" target="_top" class="left-font01">退出</a>&nbsp;]
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <c:if test="${sessionScope.role=='admin'}">
            <!-- 1.管理员显示的功能开始    -->
            <!-- 1.1成员信息显示功能开始    -->
            <TABLE width="100%" border="0" cellpadding="0" cellspacing="0" class="left-table03">
                <tr>
                    <td height="29">
                        <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="8%"><img name="img8" id="img8" src="images/ico04.gif" width="8" height="11"/>
                                </td>
                                <td width="92%">
                                    <a href="javascript:" target="mainFrame" class="left-font03" onClick="list('8');">成员信息管理</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </TABLE>
            <table id="subtree8" style="DISPLAY: none" width="80%" border="0" align="center" cellpadding="0"
                   cellspacing="0" class="left-table02">
                <tr>
                    <td width="9%" height="20"><img id="xiaotu20" src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%"><a href="admin/familyMemberAdd.jsp" target="mainFrame" class="left-font03"
                                       onClick="tupian('20');">成员信息录入</a></td>
                </tr>
                <tr>
                    <td width="9%" height="21"><img id="xiaotu21" src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%"><a href="/ffms/ShowAllFMServlet" target="mainFrame" class="left-font03"
                                       onClick="tupian('21');">成员信息</a></td>
                </tr>
            </table>
            <!-- 1.1成员信息显示功能结束    -->
            <!--  1.2银行账户管理开始  -->
            <TABLE width="100%" border="0" cellpadding="0" cellspacing="0" class="left-table03">
                <tr>
                    <td height="29">
                        <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="8%"><img name="img7" id="img7" src="images/ico04.gif" width="8" height="11"/>
                                </td>
                                <td width="92%">
                                    <a href="javascript:" target="mainFrame" class="left-font03" onClick="list('7');">银行账户管理</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </TABLE>
            <table id="subtree7" style="DISPLAY: none" width="80%" border="0" align="center" cellpadding="0"
                   cellspacing="0" class="left-table02">
                <tr>
                    <td width="9%" height="20"><img id="xiaotu17" src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%">
                        <a href="/ffms/PreAddBankServlet" target="mainFrame" class="left-font03"
                           onClick="tupian('17');">添加账户</a></td>

                </tr>
                <tr>
                    <td width="9%" height="20"><img src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%">
                        <a href="/ffms/AllBankServlet" target="mainFrame" class="left-font03" onClick="tupian('17');">查询账户</a>
                    </td>
                </tr>
                <tr>
                    <td width="9%" height="20"><img id="xiaotu18" src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%">
                        <a href="/ffms/AllMoneyServlet?flag=0" target="mainFrame" class="left-font03"
                           onClick="tupian('18');">存取款记录</a></td>
                </tr>
                <tr>
                    <td width="9%" height="20"><img id="xiaotu50" src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%">
                        <a href="/ffms/AllMoneyServlet?flag=1" target="mainFrame" class="left-font03"
                           onClick="tupian('18');">借还钱记录</a></td>
                </tr>
            </table>
            <!--  1.2银行账户管理结束-->
            <!--  1.3 财务分析开始  -->
            <TABLE width="100%" border="0" cellpadding="0" cellspacing="0" class="left-table03">
                <tr>
                    <td height="29">
                        <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="8%"><img name="img1" id="img1" src="images/ico04.gif" width="8" height="11"/>
                                </td>
                                <td width="92%">
                                    <a href="javascript:" target="mainFrame" class="left-font03" onClick="list('1');">财务分析</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </TABLE>
            <table id="subtree1" style="DISPLAY: none" width="80%" border="0" align="center" cellpadding="0"
                   cellspacing="0" class="left-table02">
                <tr>
                    <td width="9%" height="20"><img id="xiaotu1" src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%"><a href="/ffms/AllShouruServlet" target="mainFrame" class="left-font03"
                                       onClick="tupian('1');">收入情况</a></td>
                </tr>
                <tr>
                    <td width="9%" height="20"><img src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%"><a href="/ffms/AllZhiChuServlet" target="mainFrame" class="left-font03"
                                       onClick="tupian('2');">支出情况</a></td>
                </tr>
                <tr>
                    <td width="9%" height="20"><img src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%"><a href="/ffms/TjServlet" target="mainFrame" class="left-font03"
                                       onClick="tupian('2');">收入支出统计</a></td>
                </tr>

            </table>
            <!--  1.管理员显示的功能结束    -->
            </c:if>
            <!--  1.管理员显示的功能结束    -->
            <c:if test="${sessionScope.role=='fm'}">
            <!--  1.1 成员日常收支开始    -->
            <TABLE width="100%" border="0" cellpadding="0" cellspacing="0" class="left-table03">
                <tr>
                    <td height="29">
                        <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="8%"><img name="img7" id="img" src="images/ico04.gif" width="8" height="11"/>
                                </td>
                                <td width="92%">
                                    <a href="javascript:" target="mainFrame" class="left-font03" onClick="list('7');">成员日常收支</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </TABLE>
            <table id="subtree7" style="DISPLAY: none" width="80%" border="0" align="center" cellpadding="0"
                   cellspacing="0" class="left-table02">
                <tr>
                    <td width="9%" height="20"><img src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%">
                        <a href="/ffms/PreAddShouruServlet?name=${sessionScope.user.name}" target="mainFrame"
                           class="left-font03" onClick="tupian('16');">收入添加</a></td>
                </tr>
                <tr>
                    <td width="9%" height="20"><img src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%">
                        <a href="/ffms/AllShouruServlet" target="mainFrame" class="left-font03" onClick="tupian('17');">收入模块</a>
                    </td>
                </tr>
                <tr>
                    <td width="9%" height="20"><img src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%">
                        <a href="/ffms/PreAddZhichuServlet?name=${sessionScope.user.name}" target="mainFrame" class="left-font03" onClick="tupian('19');">支出添加</a>
                    </td>
                </tr>

                <tr>
                    <td width="9%" height="20"><img src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%">
                        <a href="/ffms/AllZhiChuServlet" target="mainFrame" class="left-font03" onClick="tupian('20');">支出模块</a>
                    </td>
                </tr>
            </table>

            <!--  1.1 成员日常收支结束-->

            <!--  1.2 成员银行账户开始    -->
            <TABLE width="100%" border="0" cellpadding="0" cellspacing="0" class="left-table03">
                <tr>
                    <td height="29">
                        <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="8%"><img name="img1" src="images/ico04.gif" width="8" height="11"/></td>
                                <td width="92%">
                                    <a href="javascript:" target="mainFrame" class="left-font03" onClick="list('1');">银行账户</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </TABLE>
            <table id="subtree1" style="DISPLAY: none" width="80%" border="0" align="center" cellpadding="0"
                   cellspacing="0" class="left-table02">
                    <%--				<tr>--%>
                    <%--					<td width="9%" height="20"><img id="xiao" src="images/ico06.gif" width="8" height="12" /></td>--%>
                    <%--					<td width="91%"><a href="courseRegister.html" target="mainFrame" class="left-font03" onClick="tupian('1');">添加课程</a></td>--%>
                    <%--				</tr>--%>
                <tr>
                    <td width="9%" height="20"><img src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%"><a href="/ffms/AllBankServlet" target="mainFrame" class="left-font03"
                                       onClick="tupian('2');">查看账户</a></td>
                </tr>
                <tr>
                    <td width="9%" height="20"><img src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%"><a href="/ffms/PreAddMoneyServlet?name=${sessionScope.user.name}" target="mainFrame" class="left-font03"
                                       onClick="tupian('2');">添加银行流水信息</a></td>
                </tr>
                <tr>
                    <td width="9%" height="20"><img src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%"><a href="/ffms/AllMoneyServlet?flag=0" target="mainFrame" class="left-font03"
                                       onClick="tupian('2');">存取款记录</a></td>
                </tr>
                <tr>
                    <td width="9%" height="20"><img src="images/ico06.gif" width="8" height="12"/></td>
                    <td width="91%"><a href="/ffms/AllMoneyServlet?flag=1" target="mainFrame" class="left-font03"
                                       onClick="tupian('2');">借还款记录</a></td>
                </tr>
            </table>
            <!--  1.2  成员银行账户结束    -->
            <!--  学生显示的功能结束    -->
            </c:if>
    </tr>
    </TD>
</table>


</body>

</html>